<?php

namespace App\Services\Api;

/**
 * 获取地区字典缓存接口
 */
class CUST10101
{
    public $apiCode = 'CUST#10101';
    public $name = '';
    public $areaId = -1;
    public $domainId = -1;
    public $techRouteId = -1;
    public $pageNo = 1;
    public $pageSize = 10;

    public function getInitPostData($postData)
    {
        return [
            'name' => $this->getName(@$postData['name']),
            'areaId' => $this->getAreaId(@$postData['areaId']),
            'domainId' => $this->getDomainId(@$postData['domainId']),
            'techRouteId' => $this->getTechRouteId(@$postData['techRouteId']),
            'pageNo' => $this->getPageNo(@$postData['pageNo']),
            'pageSize' => $this->getPageSize(@$postData['pageSize']),
        ];
    }

    public function getName($name = '')
    {
        return $name ? $name : $this->name;
    }

    public function getAreaId($area = '')
    {
        return $area ? $area : $this->areaId;
    }

    public function getDomainId($domain = '')
    {
        return $domain ? $domain : $this->domainId;
    }

    public function getTechRouteId($techRoute = '')
    {
        return $techRoute ? $techRoute : $this->techRouteId;
    }

    public function getPageNo($pageNo = '')
    {
        return $pageNo ? $pageNo : $this->pageNo;
    }

    public function getPageSize($pageSize = '')
    {
        return $pageSize ? $pageSize : $this->pageSize;
    }

    public function getInitApiCode()
    {
        return $this->apiCode;
    }

}
